package com.donica.wamstest.entity;

import java.sql.Timestamp;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户VO类
 */
public class UserVO {
	private String id;
	private String role; 
	private String password; 
	private String department;
	private String phone;
	private String email;
	private String creator;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+0")
	private Timestamp create_time;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+0")
	private Timestamp update_time;
	
    List<PermissionVO> permissions;
 
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Timestamp getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Timestamp create_time) {
		this.create_time = create_time;
	}

	public Timestamp getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(Timestamp update_time) {
		this.update_time = update_time;
	}

	public List<PermissionVO> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<PermissionVO> permissions) {
		this.permissions = permissions;
	}


	public void initNullItem() {
		if(department == null) {
			department = "";
		}
		if(phone == null) {
			phone = "";
		}
		if(email == null) {
			email = "";
		}
		if(creator == null) {
			creator = "";
		}
	}
}
